package collection;

import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collection;

public class GenericDemo {
    public static void main(String[] args) {
        Collection<String>c = new ArrayList<>();
        c.add("one two three");
        System.out.println(c);

        Collection<Integer>c2 = new ArrayList<>();
        c2.add(123);
        c2.add(Integer.valueOf(123));
        System.out.println(c2);
        c2.iterator();
        System.out.println(c2.iterator());
    }
}
